// pages/myrecord/myrecord
var app = getApp()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    orderList:[],
    _ism:-1
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options){
    var that = this;
    var _ism = wx.getStorageSync("_ism");
    var member_id = wx.getStorageSync("_hairdresser_id");
    console.log(member_id);
    //调用应用实例的方法获取全局数据
    that.setData({

      userInfo: wx.getStorageSync("userInfo"),
      _ism:_ism
    }); 

      wx.request({
        url: app.globalData.api_url + "index.php?ac=mfapi&ts=orders_get_all",
        data: {
          ism:_ism,
          hid: member_id,
          orderStat:0
        },
        header: { 'content-type': 'application/json' },
        success: function (res) {
          console.log(res.data);
          that.setData({
            orderList: res.data
          });
        }
      })
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  }, 
})